<!--
 * @Author: wangwang 2723008256@qq.com
 * @Date: 2022-05-09 14:24:22
 * @LastEditors: wangwang 2723008256@qq.com
 * @LastEditTime: 2022-08-15 09:19:53
 * @FilePath: \jzjy\src\views\DashBoard\searchRes.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->

<template>
  <div id="container">
    <div style="width: 100%; height: 100%">
      <div class="video" id="video"></div>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  data() {
    return {};
  },
  mounted() {
    this.loadCkplayer();
  },
  methods: {
    loadCkplayer() {
      var videoObject = {
        container: ".video", //“#”代表容器的ID，“.”或“”代表容器的class
        variable: "player", //播放函数名称，该属性必需设置，值等于下面的new ckplayer()的对象
        autoplay: true,
        // live: true,
        volume: 0.2,
        overspread: false, //是否让视频铺满播放器
        html5m3u8: true, //m3u8-hls形式播放视频
        // video: 'rtmp://58.200.131.2:1935/livetv/cctv1'//视频地址
        video:
          "https://pufa02.oss-cn-beijing.aliyuncs.com/lianghongxia/lianghongxia3.mp4", //视频地址
        // video:'http://p2.vzan.com/1867517352/723871122816627452/live.m3u8?zbid=1867517352&tpid=938086791',//视频地址
        menu: [
         
          {
            title: "version:X3",
            underline: true,
            underline:true
          },
          {
            title: "调用外部JS",
            javascript: "hello",
            underline:true
          },
          {
            title: "关于视频",
            click: "aboutShow",
            underline:true
          },
        ],
      };
      window.player = new ckplayer(videoObject);
    },
  },
};
</script>

<style lang="less" scoped>
#container {
  #video {
    width: 640px;
    height: 360px;
  }
}
</style>